// 引入封装好的axios
import axios from '@/utils/myaxios.js'
export const userlogin = function(data){
  return axios({
    url:'/login',
    method:'post',
    data
  })
}
export const userRegister = function(data){
  return axios ({
    method:'post',
    url:'/register',
    data
  })
}
// 通过id获取到个人中心用户的个人记录详情
export const getUserInfo = function(id){
  return axios({
    url:`/user/${id}`,
    // headers: { Authorization: localStorage.getItem('toutiao_59_token') }
  })

}
// 编辑用户信息
export const updateUserInfo = function(id,data){
  return axios ({
    method:'post',
    url:`/user_update/${id}`,
    data
  })
}
